const setFontSize = () => {
    var screenW =
        document.documentElement.clientWidth || document.body.clientWidth;
    var hDom = document.getElementsByTagName("html")[0];
    hDom.style.fontSize = screenW / 1920 + "px";
}
setFontSize()
window.addEventListener("resize", setFontSize);